{# v-on="$listeners" needed becaues vue/compat removes them from $attrs #}
{# New mt-number-field component #}
{% block sw_number_field %}
<mt-number-field
    v-if="!deprecated"
    v-bind="$attrs"
    v-model="currentValue"
>
    <template
        v-for="(index, name) in getSlots()"
        #[name]="data"
    >
        <slot
            :name="name"
            v-bind="data"
        >
        </slot>
    </template>
    <slot></slot>
</mt-number-field>
{% endblock %}

{# Deprecated component #}
<sw-number-field-deprecated
    v-else
    v-bind="$attrs"
    :value="value"
>
    <template
        v-for="(index, name) in getSlots()"
        #[name]="data"
    >
        <slot
            :name="name"
            v-bind="data"
        >
        </slot>
    </template>
    <slot></slot>
</sw-number-field-deprecated>
